"Read and answer the next ascii-encoded hexadecimal byte as a
positive Integer."
^(self next digitValue bitShift: 12)
+ (self next digitValue bitShift: 8) + (self next digitValue bitShift: 4) + self next digitValue! !'From Smalltalk-80, Version 2.2 of July 4, 1987 on 17 June 1988 at 10:46:46 am'!
!Form class methodsFor: 'instance creation'!
readPostScriptImageFile: file
"Answer an instance of the receiver with bitmap initialized from the
external file.
The file format is: <width> <height> <density> [<matrix>] {<hex>}
Description of header for files containing raster images:
magic magic number 16r59A66A95
width width (pixels) of image
height height (pixels) of image
depth depth (1, 8, or 24 bits) of pixel
length length (bytes) of image
type type of file - see below
maptype type of colormap see below
maplength length (bytes) of following map
color map follows for maplength bytes, followed by image
Sun supported type's
Old 0 Raw pixrect image in 68000 byte order
Standard 1 Raw pixrect image in 68000 byte order
ByteEncoded 2 Run-length compression of bytes
Experimental 16rFFFF Reserved for testing
Sun registered maptype's
Raw 2
Sun supported maptype's
None 0 maplength is expected to be 0
EqualRGB 1 red[maplength/3], green[], blue[]
NOTES:
Each line of the image is rounded out to a multiple of 16 bits. This corresponds to the rounding convention used by the memory pixrect package (/usr/include/pixrect/memvar.h) of the SunWindows system. The encoding field (always set to 0 by Sun's supported software) was renamed to length in release 2.0. As a result, rasterfiles of type 0 generated by the old software claim to have 0 length; for compatibility, code reading rasterfiles must be prepared to compute the true length from the width, height, and depth fields.